package com.lihui;

/**
 * 功能描述
 *
 * @author wileda
 * @date 2022/09/25  22:35
 */
public class TestMyArraylist {
    public static void main(String[] args) {
        MyArraylist myArraylist = new MyArraylist();
        myArraylist.add(10);
        myArraylist.add(20);
        myArraylist.add(30);
        myArraylist.display();
        System.out.println("====================");
        System.out.println(myArraylist.contains(20));
        System.out.println(myArraylist.indexOf(30));
        System.out.println(myArraylist.get(2));
        myArraylist.set(0,100);
        myArraylist.display();
        myArraylist.remove(2);
        myArraylist.display();
        System.out.println(myArraylist.size());
        myArraylist.clear();
        myArraylist.display();
        System.out.println("===============");
        myArraylist.add(0,11);
        myArraylist.add(1,22);
        myArraylist.add(2,33);
        myArraylist.add(3,44);
        myArraylist.display();
        myArraylist.add(10);

        myArraylist.add(1,11);


        myArraylist.display();

    }
}
